HeadOfList
Type
operator
Summary
Returns the first element of Target.
Syntax
the head of <Target>
Description
Returns the first element of the list Target without modifying Target.
the head of tVar
is equivalent to using the IndexedElementOfList operator with index 1
tVar[1]
Parameters
Name | Type | Description |
---|---|---|
Target | An expression which evaluates to a list. |
Examples
variable tVar as List
put the empty list into tVar
push "first element" onto tVar
variable tResult as Boolean
if the head of tVar is "first element" then
put "success" into tResult
end if
Related
operator: IndexedElementOfList